package com.koro.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.koro.annotation.Column;
import com.koro.annotation.ColumnComment;
import com.koro.annotation.Table;
import com.koro.annotation.TableComment;
import com.koro.constants.MySqlTypeConstant;
import lombok.Data;

import java.math.BigDecimal;

@Data
@TableName("t_orders")
@Table(name = "t_orders")
@TableComment("订单管理")
public class Orders {

    @TableId(value = "id",type = IdType.AUTO)
    @Column(name = "id",type = MySqlTypeConstant.INT,isKey = true,isAutoIncrement = true)
    @ColumnComment(value = "商品id")
    private Integer id;

    @Column(name = "order_no",type = MySqlTypeConstant.VARCHAR,length = 11)
    @ColumnComment(value = "商品号")
    private String orderNo;

    @Column(name = "user_id",type = MySqlTypeConstant.INT,length = 11)
    @ColumnComment(value = "商品号")
    private Integer userId;

    @Column(name = "username",type = MySqlTypeConstant.VARCHAR,length = 100)
    @ColumnComment(value = "用户名称")
    private String username;

    @Column(name = "goods_id",type = MySqlTypeConstant.INT,length = 11)
    @ColumnComment(value = "商品id")
    private Integer goodsId;

    @Column(name = "goods_name",type = MySqlTypeConstant.VARCHAR,length = 30)
    @ColumnComment(value = "商品名称")
    private String goodsName;

    @Column(name = "num",type = MySqlTypeConstant.INT,length = 11)
    @ColumnComment(value = "下单数量")
    private Integer num;

    @Column(name = "total_price",type = MySqlTypeConstant.DECIMAL,length = 18, decimalLength = 6)
    @ColumnComment(value = "总价格")
    private BigDecimal totalPrice;

}
